<div id="toolbar" >
  <div class="right-toolbar">
  <a title="Lưu">
  <button onclick="document.forms['createPackage'].submit()">
  <img src="<?php echo $this->_baseUrl;?>/public/images/web/save.png" height="32px" width="32px"/>
  <span><p>Lưu</p></span>
  </button>
  </a>
  <a title="Quản lý template">
  <button onclick="location.href='<?php echo $this->_baseUrl;?>/admin/template'">
  <img src="<?php echo $this->_baseUrl;?>/public/images/web/template.png" height="32px" width="32px"/>
  <span><p>Template</p></span>
  </button>
  </a>
  </div>
  <div class="left-toolbar">
  <img src="<?php echo $this->_baseUrl;?>/public/images/web/package.png" height="48px" width="48px"/>
  <span>Thêm gói dịch vụ</span>
  </div>
</div>

<div id="box-content">
 <div id="box-content1">
    <form id="createPackage" action="<?php echo $this->_baseUrl;?>/admin/package/create" method="post">
      <?php
        if($this->status == 1)
        {
      ?>      
      <div style="padding-bottom:15px; color:#FF0000;width:400px;font-weight:bold;">
      <img src="<?php echo $this->_baseUrl;?>/public/images/web/error.png" width="32" height="32" style="float:left; margin-right:10px;"/>
      Lỗi : <?php echo $this->message;?>
      </div>
      <?php
       }
      ?>
      
      <p>
        <label>Tên gói</label>
        <input type="text" name="package_name" style="padding: 5px;width: 500px;" value="<?php echo $this->input_package_name;?>"/>
      </p>
      
      <p>
        <label>CPU(Số nhân)</label>
        <input type="text" name="cpu" style="padding: 5px;width: 500px;" value="<?php echo $this->input_cpu;?>"/>
      </p>
      
      <p>
        <label>RAM (MB)</label>
        <input type="text" name="ram" style="padding: 5px;width: 500px;" value="<?php echo $this->input_ram;?>"/>
      </p>
      
      <p>
        <label>Hệ điều hành</label>
        <input type="text" name="osname" style="padding: 5px;width: 500px;" value="<?php echo $this->input_osname;?>"/>
      </p>
      <p>
        <label>Giá(VNĐ/phút)</label>
        <input type="text" name="pph" style="padding: 5px;width: 500px;" value="<?php echo $this->input_pph;?>"/>
      </p>
     
     <p>
        <label>Template</label>
        <select name="template_id" style="width: 300px;">
         <?php 
            if($this->listTemp != null)
            {
                $sum = count($this->listTemp); 
                for( $i = 0; $i < $sum ; $i++)
                {
        ?>
                 <option <?php 
                    $tid = $this->listTemp[$i]['template_id'];
                    echo "value = '$tid' "; 
                    if($this->input_template_id == $tid) echo " selected='selected'";          
                 ?>><?php echo $this->listTemp[$i]['template_name'];?></option>
        <?php
                }
            }
        ?>
        </select>
     </p>
    
    </form>
 </div>
</div>
